import { request } from './request';

// 获取轮播图列表
export function getBannerList(page) {
    return request({
        url: "/api/boss/banner/list?page=" + page,
        method: "get",
    })
}

// 新建轮播图数据 
export function PostBannerStore(data) {
    return request({
        url: "/api/boss/banner/store",
        method: 'post',
        data
    })
}

// 上传banner图片 
export function PostUpload(data) {
    return request({
        url: "/api/boss/banner/upload",
        method: "post",
        data,
        headers: {
            'content-type': 'multipart/form-data'
        },
    })
}

// 更新轮播图数据
export function PutUpdata(data, id) {
    return request({
        url: "/api/boss/banner/update/" + id,
        method: "put",
        data
    })
}

// 删除轮播图数据
export function deleteData(id) {
    return request({
        url: "/api/boss/banner/delete/" + id,
        method: "delete"
    })
}
